{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=2941
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	s:string;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
write(s[length(S)]);
end.
 